## Process this file with automake to generate Makefile.in
ACLOCAL_AMFLAGS = -I m4 --install
DISTCHECK_CONFIGURE_FLAGS = --enable-examples
EXTRA_DIST = examples/WTFPL-2
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CFLAGS = $(SDL_CFLAGS)
AM_CXXFLAGS = $(SDL_CFLAGS)
## XXX: texi2dvi and texi2pdf currently fail horribly when working out
##      of a different subdirectory to the texinfo file. Until this is
##      fixed, just subdir the doc generation.
SUBDIRS = doc

libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status --recheck

pkgconfig_DATA = fake437.pc

include_HEADERS = include/fake437.h
fake437dir = $(includedir)/fake437
fake437_HEADERS = \
	include/fake437/primitive.h \
	include/fake437/surface.h \
	include/fake437/types.h

lib_LTLIBRARIES = libfake437.la

libfake437_la_SOURCES = \
	src/font_8x14.c \
	src/font_8x8.c \
	src/font_8x8_thin.c \
	src/fonts.h \
	src/primitive.c \
	src/surface.c
libfake437_la_LDFLAGS = $(SDL_L_FLAGS) -no-undefined -version-info 8:0:0
libfake437_la_LIBADD = -lSDL

if ENABLE_EXAMPLES
noinst_PROGRAMS = \
	examples/example \
	examples/sized \
	examples/surface

examples_example_SOURCES = examples/example.c
examples_example_LDADD = $(SDL_LIBS) libfake437.la

examples_sized_SOURCES = examples/sized.c
examples_sized_LDADD = $(SDL_LIBS) libfake437.la

examples_surface_SOURCES = examples/surface.c
examples_surface_LDADD = $(SDL_LIBS) libfake437.la
endif
